﻿using System;
using System.Collections.Generic;
using System.Text;

namespace TCKQKL.FrontEnd.DataModel
{
    public class StockHoldingUI
    {
        public string Symbol { set; get; }
        public string Name { set; get; }
        public decimal TradingQtty { set; get; }
        public decimal NettingQtty { get { return (NettingT1 + NettingT2 + NettingT3); } }
        public decimal BlockingQtty { set; get; }
        public decimal NettingT1 { set; get; }
        public decimal NettingT2 { set; get; }
        public decimal NettingT3 { set; get; }
        public decimal RefPrice { set; get; }
        public decimal TradingValue { get { return TradingQtty * RefPrice * 1000; } }
        public decimal NettingValue { get { return NettingQtty * RefPrice * 1000; } }
        public decimal BlockingValue { get { return BlockingQtty * RefPrice * 1000; } }
        public decimal Value { get { return (TradingQtty + NettingQtty) * RefPrice * 1000; } }

        public StockHoldingUI(){}
        public StockHoldingUI(string symbol, string name, decimal trading, decimal blocking, decimal t1, decimal t2, decimal t3, decimal refp)
        {
            Symbol = symbol;
            Name = name;
            TradingQtty = trading;
            BlockingQtty = blocking;
            NettingT1 = t1;
            NettingT2 = t2;
            NettingT3 = t3;
        }
    }
}
